home *** CD-ROM | disk | FTP | other *** search
- Path: news.microsoft.com!news
- From: a-cnadc@microsoft.com (Dann Corbit)
- Newsgroups: comp.lang.c
- Subject: Re: passing arguments to main()
- Date: 1 Mar 1996 21:36:40 GMT
- Organization: Microsoft Corporation
- Message-ID: <4h7ql8$4rs@news.microsoft.com>
- References: <4h78t1$nqq@netnews.upenn.edu>
- NNTP-Posting-Host: 157.57.171.202
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.93.14
-
- In article <4h78t1$nqq@netnews.upenn.edu>, daniels@oasis.rad.upenn.edu says...
- >
- >Hello,
- >
- >I have a question about c I am not very good with programming. I have this
- >project that I want to take two strings one a name the other being an 80
- >character message(sentence). I want it to spit out a simplt print statement at
- >an Unix prompt. But I don't know how to pass arguments to main(). also I can't
- >get the output to be entered in at the unix prompt. I want the output to be a
- >command. for a simple example
- >
- > printf("ping 165.234.323.222");
- >
- >will not ping this address it only prints this statement before the prompt
- >
- > any help would be greatly appreciated
- >--
- >Jamie
- see the man page for the system() function.
- --
- The opinions expressed in this message are my own personal views
- and do not reflect the official views of Microsoft Corporation.
- In fact, I'm just a subcontractor, not an employee, so pull in your claws.
-
-